import {createRouter, createWebHashHistory} from 'vue-router'

import Main from "../components/layouts/Main.vue"; //引入组件
import RoleView from "../components/admin/RoleView.vue"
import UserView from "../components/admin/UserView.vue"

const routes = [
    {
        path: '/',
        name: 'Main',
        component: Main,
        children: [
            {
                path: '/admin/RoleView',
                name: 'RoleView',
                component: RoleView,
                meta: {
                    breadcrumb: ['系统配置', '角色管理'],
                    index: '2-1'
                }
            },
            {
                path: '/admin/UserView',
                name: 'UserView',
                component: UserView,
                meta: {
                    breadcrumb: ['系统配置', '用户管理'],
                    index: '2-1'
                }
            },
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router